﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Model;
using Ext.Net;

namespace Web.View
{
    public partial class Welcome : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["currentUserID"] == null || Session["userpwd"] == null || Session["role"] == null)
                Response.Redirect("/View/Login.aspx");
        }

        protected void NoticeInfoBind(object sender, StoreRefreshDataEventArgs e)
        {
            newsinfoMgr mgr = new newsinfoMgr();
            IList<newsInfo> list = mgr.FindNewsinfoByClassify("通知公告");
            Notice_Store.DataSource = list;
            Notice_Store.DataBind();
        }

        protected void NewsInfoBind(object sender, StoreRefreshDataEventArgs e)
        {
            newsinfoMgr mgr = new newsinfoMgr();
            IList<newsInfo> list = mgr.FindNewsinfoByClassify("新闻资讯");
            News_store.DataSource = list;
            News_store.DataBind();
        }

        protected void FileInfoBind(object sender, StoreRefreshDataEventArgs e)
        {
            newsinfoMgr mgr = new newsinfoMgr();
            IList<newsInfo> list = mgr.FindNewsinfoByClassify("常用文件");
            File_store.DataSource = list;
            File_store.DataBind();
        }
    }
}